package jpa.config;

//import jpa.auditing.AuditorAwareImpl;

import jpa.auditing.AuditorAwareShiroImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

/**
 * Created by barton on 16-5-12.
 */
@EnableJpaAuditing
@Configuration
public class AuditingConfiguration {
    //    @Bean(name = "userAuditorAware")
//    AuditorAwareImpl auditorAware() {
//        return new AuditorAwareImpl();
//    }
    @Bean(name = "userAuditorAware")
    AuditorAwareShiroImpl auditorAware() {
        return new AuditorAwareShiroImpl();
    }
}
